﻿using System.Collections.Generic;

namespace TryJSONServiceApplication
{
    // NOTE: You can use the "Rename" command on the "Refactor" menu to change the class name "PersonJSONService" in code, svc and config file together.
    public class PersonJSONService : IPersonJSONService
    {
List<Person> people = new List<Person>(){
            new Person { firstName = "www" , lastName = "sss", age = 10},
            new Person { firstName = "aaa" , lastName = "qqq", age = 12},
            new Person { firstName = "eee" , lastName = "ddd", age = 14},
            new Person { firstName = "rrr" , lastName = "fff", age = 15}
            };
        public Person[] getAllPeople()
        {
           
            return people.ToArray();
        }


        public Person getPeople(int id)
        {
            return people[id];
        }
    }
}
